<?php include "lang.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <?php include "import.php"; ?>
        <title><?php echo $langs["service"]; ?></title>
    </head>

    <body>
        <?php include("floating-panel.php"); ?>
        <div class="wrapper">
            <?php
            include("header.php");
            include "../service/serviceService.php";
            ?>
            <div class="main_body">
                <div class="content_box_header"><?php echo $langs["service"]; ?></div>
                <div class="service_content">
                    <div class="content">
                        <?php
                        $result = findAllServices($_SESSION["lang"]);
                        $services = array();
                        while ($row = ConnectionManager::getInstance()->fetch($result)) {
                            $services[$row["SEV_ID"]] = $row["SEV_TITLE_" . $_SESSION["lang"]];
                        }
                        ?>
                        <div class="service_box" onclick="window.location.href = 'service-detail.php?id=1';">
                            <div class="service_box_header"><?php echo $services[1]; ?></div>
                            <img src="../images/layout/consultation.png" width="402" height="172"/>
                        </div>
                        <div class="service_box" onclick="window.location.href = 'service-detail.php?id=2';">
                            <div class="service_box_header"><?php echo $services[2]; ?></div>
                            <img src="../images/layout/warranty.png" width="402" height="172"/>
                        </div>
                        <div class="service_box" onclick="window.location.href = 'service-detail.php?id=3';">
                            <div class="service_box_header"><?php echo $services[3]; ?></div>
                            <img src="../images/layout/customer_service.png" width="402" height="172"/>
                        </div>
                        <div class="service_box" onclick="window.location.href = 'service-detail.php?id=4';">
                            <div class="service_box_header"><?php echo $services[4]; ?></div>
                            <img src="../images/layout/after_sales.png" width="402" height="172"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php
        include("footer.php");
        ConnectionManager::getInstance()->closeConnection();
        ?>
    </body>
</html>